Skip to content

Add a Windows installer, built and checked in CI - #108

Merged
tobi merged 4 commits into
tobi:mainfrom
ai94iq:feat/windows-installer
Nov 25, 2026
Merged

tobi merged 4 commits into
tobi:mainfrom
ai94iq:feat/windows-installer

Conversation

@ai94iq

@ai94iq ai94iq commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Windows releases ship only a zip, so disktree.exe ends up running out of
Downloads or wherever it was unpacked, with no Start menu entry and nothing
in Settings > Apps to remove it. This adds a setup program per architecture,
next to the zip, which stays:

  • disktree-<version>-x86_64-windows-setup.exe
  • disktree-<version>-aarch64-windows-setup.exe

Each installs disktree, adds a Start menu entry and a desktop shortcut,
registers an uninstaller in Settings > Apps, and upgrades in place.

How

  • packaging/windows/disktree.iss: an Inno Setup 7 script, beside
    packaging/macos/. It takes /DAppVersion and /DArch and aborts the
    compile if either is missing or unknown.
  • Per user by default. The setup installs for the current user with no
    UAC prompt, the way make install uses ~/.local. Its first page offers
    all users instead (PrivilegesRequiredOverridesAllowed=dialog).
  • A fixed AppId. It is how upgrades and the uninstaller find an
    existing install, so like the macOS bundle identifier it must not change;
    AGENTS.md says so.
  • Nothing depends on the install location. Settings stay in
    %APPDATA% (power.rs), and Restart as Administrator uses
    current_exe() (access.rs).
  • Pinned Inno Setup. packaging/windows/install-inno.ps1 installs
    Inno Setup 7.1.0 from its GitHub release, checked against a pinned
    SHA256. The runners' own copies are older and differ: 6.7.1 on
    windows-2025, 6.6.1 on windows-11-arm. The script fails on a hash
    mismatch, a non-zero installer exit or a missing ISCC.exe.
  • release.yml: the Windows job compiles the setup for its
    architecture and uploads it with a .sha256 in the same format as the
    zip's.
  • ci.yml: the Windows job compiles the x64 setup and the Windows
    aarch64 job the Arm64 one, so a broken script fails the pull request
    rather than a release halfway through. Both then run
    packaging/windows/check-setup.ps1. It installs silently, checks the
    exe, both shortcuts and the uninstall entry, and installs again as an
    upgrade, expecting one entry. It then uninstalls and checks that nothing
    is left.

The setup is not signed. README tells users that SmartScreen will say
"Windows protected your PC" and to choose More info, then Run anyway.
Signing, winget and an Open with entry for folders are left for later.

Verified

On Windows 11 x64, with Inno Setup 7.1.0:

  • ISCC compiles the setup (6.2 MB) with no warnings. Leaving out /DArch,
    or passing an unknown one, aborts with the script's message.
  • A silent per-user install puts disktree in
    %LOCALAPPDATA%\Programs\disktree, with both shortcuts and an entry
    named "disktree 0.11.0", and disktree launches.
  • Installing again over a running disktree closes it through Restart
    Manager and replaces it with no reboot, leaving one uninstall entry.
  • Uninstalling removes the exe, both shortcuts, the entry and the folder.
  • check-setup.ps1 and the CI step body, run as written, pass.
  • cargo xtask lint is green. No Rust code changed.

The Arm64 setup has not been run on Arm64 hardware; the windows-11-arm CI
job is its first run.

packaging/windows/disktree.iss builds disktree-<version>-<arch>-windows-
setup.exe from the release binary. It installs for the current user with
no UAC prompt by default (the first page offers all users), adds a Start
menu entry, a desktop shortcut and an uninstaller in Settings > Apps, and
upgrades in place, keyed by a fixed AppId. x86_64 and aarch64 each get
their own setup.

Verified with Inno Setup 7.1.0 on Windows 11 x64: ISCC compiles cleanly;
leaving out /DArch or passing an unknown one aborts the compile; a silent
/CURRENTUSER install creates the exe, both shortcuts and the uninstall
entry, and disktree launches; a second install upgrades with one uninstall
entry; unins000.exe removes all of it including the install folder.
The windows release job installs Inno Setup 7.1.0 from its GitHub release,
checked against a pinned SHA256 (the runners carry 6.7.1 and 6.6.1),
compiles packaging/windows/disktree.iss for the job's architecture, and
uploads the setup with a sha256 file in the same format as the zip's.

Verified: the pinned hash is of the downloaded installer, whose
Authenticode signature is valid; the workflow parses. Not yet run in
Actions.
README: the setup is the default Windows download, per-user unless all
users is chosen, unsigned so SmartScreen needs More info then Run anyway;
the zip remains. AGENTS.md: how to compile the setup locally, and that its
AppId must never change.

Verified: cargo xtask lint is green.
CI compiled nothing of the installer, so a broken disktree.iss would first
fail inside a release, after its draft exists, and the Arm64 setup had
never been built at all. The Windows job now compiles the x64 setup and
the Windows aarch64 job the Arm64 one; both run check-setup.ps1, which
installs it silently for the current user, checks the exe, Start menu and
desktop shortcuts and the uninstall entry, installs again as an upgrade
(one entry left), uninstalls and checks nothing remains.

install-inno.ps1 takes over the pinned, hash-checked Inno Setup install
from release.yml and now fails on a non-zero installer exit or a missing
ISCC.exe instead of leaving the next step to report it.

Verified locally on Windows 11 x64: both scripts pass, and the CI
Installer step body, run as written, compiles a 0.0.0 setup and reports
"setup installs, upgrades and uninstalls cleanly". Upgrading while
disktree runs closes it through Restart Manager without a reboot. The
Arm64 job has not run yet.
@tobi
tobi merged commit b72ec05 into tobi:main Nov 25, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants